package com.zr.userInfo.mapper;

import com.zr.userInfo.pojo.PaymentInformation;
import com.zr.userInfo.pojo.UserInfo;
import com.zr.userInfo.pojo.UserInfoAddVo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * Created by Administrator on 2019/7/3.
 */
@Mapper
public interface UserInfoMapper {

    @Insert("insert into userinfo (name,idCode,phone,qqCode,createTime,createName,updateTime,updateName) values " +
            "(#{name},#{idCode},#{phone},#{qqCode},#{createTime},#{createName},#{updateTime},#{updateName})")
    void essentialInformation(UserInfo userInfo);

    @Select("select name,idCode,phone,qqCode from userinfo where loginId = #{loginId}")
    UserInfoAddVo queryLoginId(Integer loginId);

    @Select("select myCourse,amountInstallments,paymentCycle,classHours from paymentinformation where id=#{id}")
    PaymentInformation queryByPid(Integer id);
}
